import { get, post } from '@/utils/request'

// 职位列表
export const list = (query) => {
  return get('/admin/opJob/getJobList', query)
}
export const copy = (query) => {
  return get('/admin/opJob/copy', query)
}
export const add = (query) => {
  return post('/admin/opJob/add', query)
}
export const edit = (query) => {
  return post('/admin/opJob/editJob', query)
}
export const publishOrClose = (query) => {
  return get('/admin/opJob/publishOrClose', query)
}
export const recommend = (query) => {
  return post('/admin/opJob/top', query)
}
export const del = (query) => {
  return get('/admin/opJob/deleteJob', query)
}
// 批次列表
export const listBatch = (query) => {
  return get('/admin/opBatch/list', query)
}

// 查询一条
export const oneBatch = (query) => {
  return get('/admin/opBatch/queryById', query)
}
// 新增批次
export const addBatch = (query) => {
  return post('/admin/opBatch/add', query)
}

// 修改批次
export const editBatch = (query) => {
  return post('/admin/opBatch/edit', query)
}
// 删除批次
export const delBatch = (query) => {
  return get('/admin/opBatch/delete', query)
}

// 过滤条件
export const opFilterAdd = (query) => {
  return post('/admin/opFilter/add', query)
}
// 修改过滤条件
export const opFilterEdit = (query) => {
  return post('/admin/opFilter/edit', query)
}
// 根据id查询过滤条件
export const opFilterOne = (query) => {
  return get('/admin/opFilter/queryById', query)
}

export const list_v2 = (query) => {
  return get('/base/position/list', query)
}
export const add_v2 = (query) => {
  return post('/base/position/add', query)
}
export const edit_v2 = (query) => {
  return post('/base/position/edit', query)
}
export const publishOrClose_v2 = (query) => {
  return get('/base/position/publishOrClose', query)
}
export const del_v2 = (query) => {
  return post('/base/position/delete', query)
}
